//
//  HNOrderShoppingCell.m
//  baidaifu
//
//  Created by 朱传正 on 2017/1/19.
//  Copyright © 2017年 haoniu. All rights reserved.
//

#import "HNOrderShoppingCell.h"

@implementation HNOrderShoppingCell

-(void)changeState:(NSInteger)state{
    if (state == 0) {
        [self.cellState setBackgroundColor:RGB(248, 120, 122)];
        [self.cellState setText:@"待付款"];
    }else if(state == 3 || state == 4){
        [self.cellState setBackgroundColor:RGB(100, 196, 250)];
        [self.cellState setText:@"已完成"];
    }else{
        [self.cellState setBackgroundColor:RGB(85, 206, 84)];
        [self.cellState setText:@"已付款"];
    }
}

- (void)awakeFromNib {
    [super awakeFromNib];
    _cellState.layer.masksToBounds = YES;
    _cellState.layer.cornerRadius = _cellState.frame.size.height/2;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
